package login

import (
	"context"

	v1 "web-ppt/api/login/v1"
	"web-ppt/internal/consts"

	"github.com/gogf/gf/v2/frame/g"
)

func (c *ControllerV1) Out(ctx context.Context, req *v1.OutReq) (res *v1.OutRes, err error) {
	c.session.Remove(ctx, consts.User)
	g.RequestFromCtx(ctx).Response.RedirectTo("/")
	return
}
